<?php
//lesson-route
Route::group(['middleware' => ['web', 'auth:admin'],'prefix'=>'shop','namespace'=>"Modules\Shop\Http\Controllers"],
function () {
	Route::get('/', 'ShopController@index')->middleware("permission:admin");
	Route::resource('/category','CategoryController')->middleware("permission:admin,resource");
	Route::resource('article', 'ArticleController')->middleware("permission:admin,resource");
	Route::resource ('/tag','TagController')->middleware("permission:admin,resource");
});
 
//article-route
Route::group(['middleware' => ['web'],'namespace'=>"Modules\Shop\Http\Controllers"],
function () {
    Route::get('/list/{id}','HomeController@list');
	Route::get('/detail/{article}','HomeController@detail');
	Route::get('/tag/{tag_id}','HomeController@tag');
	Route::post('/search','SearchController@index');
});
 
//friend-route
Route::group(['middleware' => ['web', 'auth:admin'],'prefix'=>'shop','namespace'=>"Modules\Shop\Http\Controllers"],
function () {
    Route::resource('friend', 'FriendController')->middleware("permission:admin,resource");
});